home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / BibTeX / BibTeX inputs / abbrvnat.bst < prev    next >
Text File  |  1996-08-20  |  25KB  |  1,279 lines

  1. %% 
  2. %% This is file `abbrvnat.bst', generated 
  3. %% on <1995/12/7> with the docstrip utility (2.2i).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% natbst.mbs  (with options: `sorted,atit-lower')
  8. %% ---------------------------------------- 
  9. %% *** Version of `abbrv.bst' for use with natbib package *** 
  10. %% 
  11.  % The original source file contains the following version information:
  12.  % \ProvidesFile{natbst.mbs}[1995/09/05 1.0 (PWD)]
  13.  
  14.  %% BibTeX `plainnat' family
  15.  %%   version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
  16.  %%
  17.  %% For use with the `natbib.sty' package; emulates the corresponding
  18.  %%   member of the `plain' family, but with author-year citations.
  19.  %%
  20.  %% With version 6.0 of `natbib.sty', it may also be used for numerical
  21.  %%   citations, while retaining the commands \citeauthor, \citefullauthor,
  22.  %%   and \citeyear to print the corresponding information.
  23.  %%
  24. ENTRY
  25.   { address
  26.     author
  27.     booktitle
  28.     chapter
  29.     edition
  30.     editor
  31.     howpublished
  32.     institution
  33.     journal
  34.     key
  35.     month
  36.     note
  37.     number
  38.     organization
  39.     pages
  40.     publisher
  41.     school
  42.     series
  43.     title
  44.     type
  45.     volume
  46.     year
  47.   }
  48.   {}
  49.   { label extra.label sort.label short.list }
  50.  
  51. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  52.  
  53. FUNCTION {init.state.consts}
  54. { #0 'before.all :=
  55.   #1 'mid.sentence :=
  56.   #2 'after.sentence :=
  57.   #3 'after.block :=
  58. }
  59.  
  60. STRINGS { s t }
  61.  
  62. FUNCTION {output.nonnull}
  63. { 's :=
  64.  %% 
  65. %% This is file `abbrvnat.bst', generated 
  66. %% on <1995/12/7> with the docstrip utility (2.2i).
  67. %% 
  68. %% The original source files were:
  69. %% 
  70. %% natbst.mbs  (with options: `sorted,atit-lower')
  71. %% ---------------------------------------- 
  72. %% *** Version of `abbrv.bst' for use with natbib package *** 
  73. %% 
  74.  % The original source file contains the following version information:
  75.  % \ProvidesFile{natbst.mbs}[1995/09/05 1.0 (PWD)]
  76.  
  77.  %% BibTeX `plainnat' family
  78.  %%   version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
  79.  %%
  80.  %% For use with the `natbib.sty' package; emulates the corresponding
  81.  %%   member of the `plain' family, but with author-year citations.
  82.  %%
  83.  %% With version 6.0 of `natbib.sty', it may also be used for numerical
  84.  %%   citations, while retaining the commands \citeauthor, \citefullauthor,
  85.  %%   and \citeyear to print the corresponding information.
  86.  %%
  87. ENTRY
  88.   { address
  89.     author
  90.     booktitle
  91.     chapter
  92.     edition
  93.     editor
  94.     howpublished
  95.     institution
  96.     journal
  97.     key
  98.     month
  99.     note
  100.     number
  101.     organization
  102.     pages
  103.     publisher
  104.     school
  105.     series
  106.     title
  107.     type
  108.     volume
  109.     year
  110.   }
  111.   {}
  112.   { label extra.label sort.label short.list }
  113.  
  114. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  115.  
  116. FUNCTION {init.state.consts}
  117. { #0 'before.all :=
  118.   #1 'mid.sentence :=
  119.   #2 'after.sentence :=
  120.   #3 'after.block :=
  121. }
  122.  
  123. STRINGS { s t }
  124.  
  125. FUNCTION {output.nonnull}
  126. { 's :=
  127.  }
  128.     'skip$
  129.   if$
  130. }
  131.  
  132. FUNCTION {emphasize}
  133. { duplicate$ empty$
  134.     { pop$ "" }
  135.     { "{\em " swap$ * "}" * }
  136.   if$
  137. }
  138.  
  139. INTEGERS { nameptr namesleft numnames }
  140.  
  141. FUNCTION {format.names}
  142. { 's :=
  143.   #1 'nameptr :=
  144.   s num.names$ 'numnames :=
  145.   numnames 'namesleft :=
  146.     { namesleft #0 > }
  147.     { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
  148.       nameptr #1 >
  149.         { namesleft #1 >
  150.             { ", " * t * }
  151.             { numnames #2 >
  152.                 { "," * }
  153.                 'skip$
  154.               if$
  155.               t "others" =
  156.                 { " et~al." * }
  157.                 { " and " * t * }
  158.               if$
  159.             }
  160.           if$
  161.         }
  162.         't
  163.       if$
  164.       nameptr #1 + 'nameptr :=
  165.       namesleft #1 - 'namesleft :=
  166.     }
  167.   while$
  168. }
  169.  
  170. FUNCTION {format.authors}
  171. { author empty$
  172.     { "" }
  173.     { author format.names }
  174.   if$
  175. }
  176.  
  177. FUNCTION {format.editors}
  178. { editor empty$
  179.     { "" }
  180.     { editor format.names
  181.       editor num.names$ #1 >
  182.         { ", editors" * }
  183.         { ", editor" * }
  184.       if$
  185.     }
  186.   if$
  187. }
  188.  
  189. FUNCTION {format.title}
  190. { title empty$
  191.     { "" }
  192.     { title "t" change.case$ }
  193.   if$
  194. }
  195.  
  196. FUNCTION {format.full.names}
  197. {'s :=
  198.   #1 'nameptr :=
  199.   s num.names$ 'numnames :=
  200.   numnames 'namesleft :=
  201.     { namesleft #0 > }
  202.     { s nameptr
  203.       "{vv~}{ll}" format.name$ 't :=
  204.       nameptr #1 >
  205.         {
  206.           namesleft #1 >
  207.             { ", " * t * }
  208.             {
  209.               numnames #2 >
  210.                 { "," * }
  211.                 'skip$
  212.               if$
  213.               t "others" =
  214.                 { " et~al." * }
  215.                 { " and " * t * }
  216.               if$
  217.             }
  218.           if$
  219.         }
  220.         't
  221.       if$
  222.       nameptr #1 + 'nameptr :=
  223.       namesleft #1 - 'namesleft :=
  224.     }
  225.   while$
  226. }
  227.  
  228. FUNCTION {author.editor.key.full}
  229. { author empty$
  230.     { editor empty$
  231.         { key empty$
  232.             { cite$ #1 #3 substring$ }
  233.             'key
  234.           if$
  235.         }
  236.         { editor format.full.names }
  237.       if$
  238.     }
  239.     { author format.full.names }
  240.   if$
  241. }
  242.  
  243. FUNCTION {author.key.full}
  244. { author empty$
  245.     { key empty$
  246.          { cite$ #1 #3 substring$ }
  247.           'key
  248.       if$
  249.     }
  250.     { author format.full.names }
  251.   if$
  252. }
  253.  
  254. FUNCTION {editor.key.full}
  255. { editor empty$
  256.     { key empty$
  257.          { cite$ #1 #3 substring$ }
  258.           'key
  259.       if$
  260.     }
  261.     { editor format.full.names }
  262.   if$
  263. }
  264.  
  265. FUNCTION {make.full.names}
  266. { type$ "book" =
  267.   type$ "inbook" =
  268.   or
  269.     'author.editor.key.full
  270.     { type$ "proceedings" =
  271.         'editor.key.full
  272.         'author.key.full
  273.       if$
  274.     }
  275.   if$
  276. }
  277.  
  278. FUNCTION {output.bibitem}
  279. { newline$
  280.   "\bibitem[" write$
  281.   label write$
  282.   ")" make.full.names duplicate$ short.list =
  283.      { pop$ }
  284.      { * }
  285.    if$
  286.   "]{" * write$
  287.   cite$ write$
  288.   "}" write$
  289.   newline$
  290.   ""
  291.   before.all 'output.state :=
  292. }
  293.  
  294. FUNCTION {n.dashify}
  295. { 't :=
  296.   ""
  297.     { t empty$ not }
  298.     { t #1 #1 substring$ "-" =
  299.         { t #1 #2 substring$ "--" = not
  300.             { "--" *
  301.               t #2 global.max$ substring$ 't :=
  302.             }
  303.             {   { t #1 #1 substring$ "-" = }
  304.                 { "-" *
  305.                   t #2 global.max$ substring$ 't :=
  306.                 }
  307.               while$
  308.             }
  309.           if$
  310.         }
  311.         { t #1 #1 substring$ *
  312.           t #2 global.max$ substring$ 't :=
  313.         }
  314.       if$
  315.     }
  316.   while$
  317. }
  318.  
  319. FUNCTION {format.date}
  320. { year duplicate$ empty$
  321.     { "empty year in " cite$ * "; set to ????" * warning$
  322.        pop$ "????" }
  323.     'skip$
  324.   if$
  325.   extra.label *
  326. }
  327.  
  328. FUNCTION {format.btitle}
  329. { title emphasize
  330. }
  331.  
  332. FUNCTION {tie.or.space.connect}
  333. { duplicate$ text.length$ #3 <
  334.     { "~" }
  335.     { " " }
  336.   if$
  337.   swap$ * *
  338. }
  339.  
  340. FUNCTION {either.or.check}
  341. { empty$
  342.     'pop$
  343.     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  344.   if$
  345. }
  346.  
  347. FUNCTION {format.bvolume}
  348. { volume empty$
  349.     { "" }
  350.     { "volume" volume tie.or.space.connect
  351.       series empty$
  352.         'skip$
  353.         { " of " * series emphasize * }
  354.       if$
  355.       "volume and number" number either.or.check
  356.     }
  357.   if$
  358. }
  359.  
  360. FUNCTION {format.number.series}
  361. { volume empty$
  362.     { number empty$
  363.         { series field.or.null }
  364.         { output.state mid.sentence =
  365.             { "number" }
  366.             { "Number" }
  367.           if$
  368.           number tie.or.space.connect
  369.           series empty$
  370.             { "there's a number but no series in " cite$ * warning$ }
  371.             { " in " * series * }
  372.           if$
  373.         }
  374.       if$
  375.     }
  376.     { "" }
  377.   if$
  378. }
  379.  
  380. FUNCTION {format.edition}
  381. { edition empty$
  382.     { "" }
  383.     { output.state mid.sentence =
  384.         { edition "l" change.case$ " edition" * }
  385.         { edition "t" change.case$ " edition" * }
  386.       if$
  387.     }
  388.   if$
  389. }
  390.  
  391. INTEGERS { multiresult }
  392.  
  393. FUNCTION {multi.page.check}
  394. { 't :=
  395.   #0 'multiresult :=
  396.     { multiresult not
  397.       t empty$ not
  398.       and
  399.     }
  400.     { t #1 #1 substring$
  401.       duplicate$ "-" =
  402.       swap$ duplicate$ "," =
  403.       swap$ "+" =
  404.       or or
  405.         { #1 'multiresult := }
  406.         { t #2 global.max$ substring$ 't := }
  407.       if$
  408.     }
  409.   while$
  410.   multiresult
  411. }
  412.  
  413. FUNCTION {format.pages}
  414. { pages empty$
  415.     { "" }
  416.     { pages multi.page.check
  417.         { "pages" pages n.dashify tie.or.space.connect }
  418.         { "page" pages tie.or.space.connect }
  419.       if$
  420.     }
  421.   if$
  422. }
  423.  
  424. FUNCTION {format.vol.num.pages}
  425. { volume field.or.null
  426.   number empty$
  427.     'skip$
  428.     { "\penalty0 (" number * ")" * *
  429.       volume empty$
  430.         { "there's a number but no volume in " cite$ * warning$ }
  431.         'skip$
  432.       if$
  433.     }
  434.   if$
  435.   pages empty$
  436.     'skip$
  437.     { duplicate$ empty$
  438.         { pop$ format.pages }
  439.         { ":\penalty0 " * pages n.dashify * }
  440.       if$
  441.     }
  442.   if$
  443. }
  444.  
  445. FUNCTION {format.chapter.pages}
  446. { chapter empty$
  447.     'format.pages
  448.     { type empty$
  449.         { "chapter" }
  450.         { type "l" change.case$ }
  451.       if$
  452.       chapter tie.or.space.connect
  453.       pages empty$
  454.         'skip$
  455.         { ", " * format.pages * }
  456.       if$
  457.     }
  458.   if$
  459. }
  460.  
  461. FUNCTION {format.in.ed.booktitle}
  462. { booktitle empty$
  463.     { "" }
  464.     { editor empty$
  465.         { "In " booktitle emphasize * }
  466.         { "In " format.editors * ", " * booktitle emphasize * }
  467.       if$
  468.     }
  469.   if$
  470. }
  471.  
  472. FUNCTION {empty.misc.check}
  473. { author empty$ title empty$ howpublished empty$
  474.   month empty$ year empty$ note empty$
  475.   and and and and and
  476.   key empty$ not and
  477.     { "all relevant fields are empty in " cite$ * warning$ }
  478.     'skip$
  479.   if$
  480. }
  481.  
  482. FUNCTION {format.thesis.type}
  483. { type empty$
  484.     'skip$
  485.     { pop$
  486.       type "t" change.case$
  487.     }
  488.   if$
  489. }
  490.  
  491. FUNCTION {format.tr.number}
  492. { type empty$
  493.     { "Technical Report" }
  494.     'type
  495.   if$
  496.   number empty$
  497.     { "t" change.case$ }
  498.     { number tie.or.space.connect }
  499.   if$
  500. }
  501.  
  502. FUNCTION {format.article.crossref}
  503. { key empty$
  504.     { journal empty$
  505.         { "need key or journal for " cite$ * " to crossref " * crossref *
  506.           warning$
  507.           ""
  508.         }
  509.         { "In {\em " journal * "\/}" * }
  510.       if$
  511.     }
  512.     { "In " key * }
  513.   if$
  514.   " \cite{" * crossref * "}" *
  515. }
  516.  
  517. FUNCTION {format.crossref.editor}
  518. { editor #1 "{vv~}{ll}" format.name$
  519.   editor num.names$ duplicate$
  520.   #2 >
  521.     { pop$ " et~al." * }
  522.     { #2 <
  523.         'skip$
  524.         { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  525.             { " et~al." * }
  526.             { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  527.           if$
  528.         }
  529.       if$
  530.     }
  531.   if$
  532. }
  533.  
  534. FUNCTION {format.book.crossref}
  535. { volume empty$
  536.     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  537.       "In "
  538.     }
  539.     { "Volume" volume tie.or.space.connect
  540.       " of " *
  541.     }
  542.   if$
  543.   editor empty$
  544.   editor field.or.null author field.or.null =
  545.   or
  546.     { key empty$
  547.         { series empty$
  548.             { "need editor, key, or series for " cite$ * " to crossref " *
  549.               crossref * warning$
  550.               "" *
  551.             }
  552.             { "{\em " * series * "\/}" * }
  553.           if$
  554.         }
  555.         { key * }
  556.       if$
  557.     }
  558.     { format.crossref.editor * }
  559.   if$
  560.   " \cite{" * crossref * "}" *
  561. }
  562.  
  563. FUNCTION {format.incoll.inproc.crossref}
  564. { editor empty$
  565.   editor field.or.null author field.or.null =
  566.   or
  567.     { key empty$
  568.         { booktitle empty$
  569.             { "need editor, key, or booktitle for " cite$ * " to crossref " *
  570.               crossref * warning$
  571.               ""
  572.             }
  573.             { "In {\em " booktitle * "\/}" * }
  574.           if$
  575.         }
  576.         { "In " key * }
  577.       if$
  578.     }
  579.     { "In " format.crossref.editor * }
  580.   if$
  581.   " \cite{" * crossref * "}" *
  582. }
  583.  
  584. FUNCTION {article}
  585. { output.bibitem
  586.   format.authors "author" output.check
  587.   new.block
  588.   format.title "title" output.check
  589.   new.block
  590.   crossref missing$
  591.     { journal emphasize "journal" output.check
  592.       format.vol.num.pages output
  593.       format.date "year" output.check
  594.     }
  595.     { format.article.crossref output.nonnull
  596.       format.pages output
  597.     }
  598.   if$
  599.   new.block
  600.   note output
  601.   fin.entry
  602. }
  603.  
  604. FUNCTION {book}
  605. { output.bibitem
  606.   author empty$
  607.     { format.editors "author and editor" output.check }
  608.     { format.authors output.nonnull
  609.       crossref missing$
  610.         { "author and editor" editor either.or.check }
  611.         'skip$
  612.       if$
  613.     }
  614.   if$
  615.   new.block
  616.   format.btitle "title" output.check
  617.   crossref missing$
  618.     { format.bvolume output
  619.       new.block
  620.       format.number.series output
  621.       new.sentence
  622.       publisher "publisher" output.check
  623.       address output
  624.     }
  625.     { new.block
  626.       format.book.crossref output.nonnull
  627.     }
  628.   if$
  629.   format.edition output
  630.   format.date "year" output.check
  631.   new.block
  632.   note output
  633.   fin.entry
  634. }
  635.  
  636. FUNCTION {booklet}
  637. { output.bibitem
  638.   format.authors output
  639.   new.block
  640.   format.title "title" output.check
  641.   howpublished address new.block.checkb
  642.   howpublished output
  643.   address output
  644.   format.date output
  645.   new.block
  646.   note output
  647.   fin.entry
  648. }
  649.  
  650. FUNCTION {inbook}
  651. { output.bibitem
  652.   author empty$
  653.     { format.editors "author and editor" output.check }
  654.     { format.authors output.nonnull
  655.       crossref missing$
  656.         { "author and editor" editor either.or.check }
  657.         'skip$
  658.       if$
  659.     }
  660.   if$
  661.   new.block
  662.   format.btitle "title" output.check
  663.   crossref missing$
  664.     { format.bvolume output
  665.       format.chapter.pages "chapter and pages" output.check
  666.       new.block
  667.       format.number.series output
  668.       new.sentence
  669.       publisher "publisher" output.check
  670.       address output
  671.     }
  672.     { format.chapter.pages "chapter and pages" output.check
  673.       new.block
  674.       format.book.crossref output.nonnull
  675.     }
  676.   if$
  677.   format.edition output
  678.   format.date "year" output.check
  679.   new.block
  680.   note output
  681.   fin.entry
  682. }
  683.  
  684. FUNCTION {incollection}
  685. { output.bibitem
  686.   format.authors "author" output.check
  687.   new.block
  688.   format.title "title" output.check
  689.   new.block
  690.   crossref missing$
  691.     { format.in.ed.booktitle "booktitle" output.check
  692.       format.bvolume output
  693.       format.number.series output
  694.       format.chapter.pages output
  695.       new.sentence
  696.       publisher "publisher" output.check
  697.       address output
  698.       format.edition output
  699.       format.date "year" output.check
  700.     }
  701.     { format.incoll.inproc.crossref output.nonnull
  702.       format.chapter.pages output
  703.     }
  704.   if$
  705.   new.block
  706.   note output
  707.   fin.entry
  708. }
  709.  
  710. FUNCTION {inproceedings}
  711. { output.bibitem
  712.   format.authors "author" output.check
  713.   new.block
  714.   format.title "title" output.check
  715.   new.block
  716.   crossref missing$
  717.     { format.in.ed.booktitle "booktitle" output.check
  718.       format.bvolume output
  719.       format.number.series output
  720.       format.pages output
  721.       address empty$
  722.         { organization publisher new.sentence.checkb
  723.           organization output
  724.           publisher output
  725.           format.date "year" output.check
  726.         }
  727.         { address output.nonnull
  728.           format.date "year" output.check
  729.           new.sentence
  730.           organization output
  731.           publisher output
  732.         }
  733.       if$
  734.     }
  735.     { format.incoll.inproc.crossref output.nonnull
  736.       format.pages output
  737.     }
  738.   if$
  739.   new.block
  740.   note output
  741.   fin.entry
  742. }
  743.  
  744. FUNCTION {conference} { inproceedings }
  745.  
  746. FUNCTION {manual}
  747. { output.bibitem
  748.   author empty$
  749.     { organization empty$
  750.         'skip$
  751.         { organization output.nonnull
  752.           address output
  753.         }
  754.       if$
  755.     }
  756.     { format.authors output.nonnull }
  757.   if$
  758.   new.block
  759.   format.btitle "title" output.check
  760.   author empty$
  761.     { organization empty$
  762.         { address new.block.checka
  763.           address output
  764.         }
  765.         'skip$
  766.       if$
  767.     }
  768.     { organization address new.block.checkb
  769.       organization output
  770.       address output
  771.     }
  772.   if$
  773.   format.edition output
  774.   format.date output
  775.   new.block
  776.   note output
  777.   fin.entry
  778. }
  779. FUNCTION {mastersthesis}
  780. { output.bibitem
  781.   format.authors "author" output.check
  782.   new.block
  783.   format.title "title" output.check
  784.   new.block
  785.   "Master's thesis" format.thesis.type output.nonnull
  786.   school "school" output.check
  787.   address output
  788.   format.date "year" output.check
  789.   new.block
  790.   note output
  791.   fin.entry
  792. }
  793.  
  794. FUNCTION {misc}
  795. { output.bibitem
  796.   format.authors output
  797.   title howpublished new.block.checkb
  798.   format.title output
  799.   howpublished new.block.checka
  800.   howpublished output
  801.   format.date output
  802.   new.block
  803.   note output
  804.   fin.entry
  805.   empty.misc.check
  806. }
  807.  
  808. FUNCTION {phdthesis}
  809. { output.bibitem
  810.   format.authors "author" output.check
  811.   new.block
  812.   format.btitle "title" output.check
  813.   new.block
  814.   "PhD thesis" format.thesis.type output.nonnull
  815.   school "school" output.check
  816.   address output
  817.   format.date "year" output.check
  818.   new.block
  819.   note output
  820.   fin.entry
  821. }
  822.  
  823. FUNCTION {proceedings}
  824. { output.bibitem
  825.   editor empty$
  826.     { organization output }
  827.     { format.editors output.nonnull }
  828.   if$
  829.   new.block
  830.   format.btitle "title" output.check
  831.   format.bvolume output
  832.   format.number.series output
  833.   address empty$
  834.     { editor empty$
  835.         { publisher new.sentence.checka }
  836.         { organization publisher new.sentence.checkb
  837.           organization output
  838.         }
  839.       if$
  840.       publisher output
  841.       format.date "year" output.check
  842.     }
  843.     { address output.nonnull
  844.       format.date "year" output.check
  845.       new.sentence
  846.       editor empty$
  847.         'skip$
  848.         { organization output }
  849.       if$
  850.       publisher output
  851.     }
  852.   if$
  853.   new.block
  854.   note output
  855.   fin.entry
  856. }
  857.  
  858. FUNCTION {techreport}
  859. { output.bibitem
  860.   format.authors "author" output.check
  861.   new.block
  862.   format.title "title" output.check
  863.   new.block
  864.   format.tr.number output.nonnull
  865.   institution "institution" output.check
  866.   address output
  867.   format.date "year" output.check
  868.   new.block
  869.   note output
  870.   fin.entry
  871. }
  872.  
  873. FUNCTION {unpublished}
  874. { output.bibitem
  875.   format.authors "author" output.check
  876.   new.block
  877.   format.title "title" output.check
  878.   new.block
  879.   note "note" output.check
  880.   format.date output
  881.   fin.entry
  882. }
  883.  
  884. FUNCTION {default.type} { misc }
  885.  
  886.  
  887. MACRO {jan} {"Jan."}
  888.  
  889. MACRO {feb} {"Feb."}
  890.  
  891. MACRO {mar} {"Mar."}
  892.  
  893. MACRO {apr} {"Apr."}
  894.  
  895. MACRO {may} {"May"}
  896.  
  897. MACRO {jun} {"June"}
  898.  
  899. MACRO {jul} {"July"}
  900.  
  901. MACRO {aug} {"Aug."}
  902.  
  903. MACRO {sep} {"Sept."}
  904.  
  905. MACRO {oct} {"Oct."}
  906.  
  907. MACRO {nov} {"Nov."}
  908.  
  909. MACRO {dec} {"Dec."}
  910.  
  911.  
  912.  
  913. MACRO {acmcs} {"ACM Comput. Surv."}
  914.  
  915. MACRO {acta} {"Acta Inf."}
  916.  
  917. MACRO {cacm} {"Commun. ACM"}
  918.  
  919. MACRO {ibmjrd} {"IBM J. Res. Dev."}
  920.  
  921. MACRO {ibmsj} {"IBM Syst.~J."}
  922.  
  923. MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
  924.  
  925. MACRO {ieeetc} {"IEEE Trans. Comput."}
  926.  
  927. MACRO {ieeetcad}
  928.  {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
  929.  
  930. MACRO {ipl} {"Inf. Process. Lett."}
  931.  
  932. MACRO {jacm} {"J.~ACM"}
  933.  
  934. MACRO {jcss} {"J.~Comput. Syst. Sci."}
  935.  
  936. MACRO {scp} {"Sci. Comput. Programming"}
  937.  
  938. MACRO {sicomp} {"SIAM J. Comput."}
  939.  
  940. MACRO {tocs} {"ACM Trans. Comput. Syst."}
  941.  
  942. MACRO {tods} {"ACM Trans. Database Syst."}
  943.  
  944. MACRO {tog} {"ACM Trans. Gr."}
  945.  
  946. MACRO {toms} {"ACM Trans. Math. Softw."}
  947.  
  948. MACRO {toois} {"ACM Trans. Office Inf. Syst."}
  949.  
  950. MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
  951.  
  952. MACRO {tcs} {"Theoretical Comput. Sci."}
  953.  
  954.  
  955. READ
  956.  
  957. FUNCTION {sortify}
  958. { purify$
  959.   "l" change.case$
  960. }
  961.  
  962. INTEGERS { len }
  963.  
  964. FUNCTION {chop.word}
  965. { 's :=
  966.   'len :=
  967.   s #1 len substring$ =
  968.     { s len #1 + global.max$ substring$ }
  969.     's
  970.   if$
  971. }
  972.  
  973. FUNCTION {format.lab.names}
  974. { 's :=
  975.   s #1 "{vv~}{ll}" format.name$
  976.   s num.names$ duplicate$
  977.   #2 >
  978.     { pop$ " et~al." * }
  979.     { #2 <
  980.         'skip$
  981.         { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  982.             { " et~al." * }
  983.             { " and " * s #2 "{vv~}{ll}" format.name$ * }
  984.           if$
  985.         }
  986.       if$
  987.     }
  988.   if$
  989. }
  990.  
  991. FUNCTION {author.key.label}
  992. { author empty$
  993.     { key empty$
  994.         { cite$ #1 #3 substring$ }
  995.         { key #3 text.prefix$ }
  996.       if$
  997.     }
  998.     { author format.lab.names }
  999.   if$
  1000. }
  1001.  
  1002. FUNCTION {author.editor.key.label}
  1003. { author empty$
  1004.     { editor empty$
  1005.         { key empty$
  1006.             { cite$ #1 #3 substring$ }
  1007.             { key #3 text.prefix$ }
  1008.           if$
  1009.         }
  1010.         { editor format.lab.names }
  1011.       if$
  1012.     }
  1013.     { author format.lab.names }
  1014.   if$
  1015. }
  1016.  
  1017. FUNCTION {author.key.organization.label}
  1018. { author empty$
  1019.     { key empty$
  1020.         { organization empty$
  1021.             { cite$ #1 #3 substring$ }
  1022.             { "The " #4 organization chop.word #3 text.prefix$ }
  1023.           if$
  1024.         }
  1025.         { key #3 text.prefix$ }
  1026.       if$
  1027.     }
  1028.     { author format.lab.names }
  1029.   if$
  1030. }
  1031.  
  1032. FUNCTION {editor.key.organization.label}
  1033. { editor empty$
  1034.     { key empty$
  1035.         { organization empty$
  1036.             { cite$ #1 #3 substring$ }
  1037.             { "The " #4 organization chop.word #3 text.prefix$ }
  1038.           if$
  1039.         }
  1040.         { key #3 text.prefix$ }
  1041.       if$
  1042.     }
  1043.     { editor format.lab.names }
  1044.   if$
  1045. }
  1046.  
  1047. FUNCTION {calc.short.authors}
  1048. { type$ "book" =
  1049.   type$ "inbook" =
  1050.   or
  1051.     'author.editor.key.label
  1052.     { type$ "proceedings" =
  1053.         'editor.key.organization.label
  1054.         { type$ "manual" =
  1055.             'author.key.organization.label
  1056.             'author.key.label
  1057.           if$
  1058.         }
  1059.       if$
  1060.     }
  1061.   if$
  1062.   'short.list :=
  1063. }
  1064.  
  1065. FUNCTION {calc.label}
  1066. { calc.short.authors
  1067.   short.list
  1068.   "("
  1069.   *
  1070.   year duplicate$ empty$
  1071.      { pop$ "????" }
  1072.      'skip$
  1073.   if$
  1074.   *
  1075.   'label :=
  1076. }
  1077.  
  1078. FUNCTION {sort.format.names}
  1079. { 's :=
  1080.   #1 'nameptr :=
  1081.   ""
  1082.   s num.names$ 'numnames :=
  1083.   numnames 'namesleft :=
  1084.     { namesleft #0 > }
  1085.     { nameptr #1 >
  1086.         { "   " * }
  1087.         'skip$
  1088.       if$
  1089.       s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
  1090.       nameptr numnames = t "others" = and
  1091.         { "et al" * }
  1092.         { t sortify * }
  1093.       if$
  1094.       nameptr #1 + 'nameptr :=
  1095.       namesleft #1 - 'namesleft :=
  1096.     }
  1097.   while$
  1098. }
  1099.  
  1100. FUNCTION {sort.format.title}
  1101. { 't :=
  1102.   "A " #2
  1103.     "An " #3
  1104.       "The " #4 t chop.word
  1105.     chop.word
  1106.   chop.word
  1107.   sortify
  1108.   #1 global.max$ substring$
  1109. }
  1110.  
  1111. FUNCTION {author.sort}
  1112. { author empty$
  1113.     { key empty$
  1114.         { "to sort, need author or key in " cite$ * warning$
  1115.           ""
  1116.         }
  1117.         { key sortify }
  1118.       if$
  1119.     }
  1120.     { author sort.format.names }
  1121.   if$
  1122. }
  1123.  
  1124. FUNCTION {author.editor.sort}
  1125. { author empty$
  1126.     { editor empty$
  1127.         { key empty$
  1128.             { "to sort, need author, editor, or key in " cite$ * warning$
  1129.               ""
  1130.             }
  1131.             { key sortify }
  1132.           if$
  1133.         }
  1134.         { editor sort.format.names }
  1135.       if$
  1136.     }
  1137.     { author sort.format.names }
  1138.   if$
  1139. }
  1140.  
  1141. FUNCTION {author.organization.sort}
  1142. { author empty$
  1143.     { organization empty$
  1144.         { key empty$
  1145.             { "to sort, need author, organization, or key in " cite$ * warning$
  1146.               ""
  1147.             }
  1148.             { key sortify }
  1149.           if$
  1150.         }
  1151.         { "The " #4 organization chop.word sortify }
  1152.       if$
  1153.     }
  1154.     { author sort.format.names }
  1155.   if$
  1156. }
  1157.  
  1158. FUNCTION {editor.organization.sort}
  1159. { editor empty$
  1160.     { organization empty$
  1161.         { key empty$
  1162.             { "to sort, need editor, organization, or key in " cite$ * warning$
  1163.               ""
  1164.             }
  1165.             { key sortify }
  1166.           if$
  1167.         }
  1168.         { "The " #4 organization chop.word sortify }
  1169.       if$
  1170.     }
  1171.     { editor sort.format.names }
  1172.   if$
  1173. }
  1174.  
  1175. FUNCTION {presort}
  1176. { calc.label
  1177.   type$ "book" =
  1178.   type$ "inbook" =
  1179.   or
  1180.     'author.editor.sort
  1181.     { type$ "proceedings" =
  1182.         'editor.organization.sort
  1183.         { type$ "manual" =
  1184.             'author.organization.sort
  1185.             'author.sort
  1186.           if$
  1187.         }
  1188.       if$
  1189.     }
  1190.   if$
  1191.   "    "
  1192.   *
  1193.   year field.or.null sortify
  1194.   *
  1195.   #1 entry.max$ substring$
  1196.   'sort.label :=
  1197.   sort.label
  1198.   "    "
  1199.   *
  1200.   title field.or.null
  1201.   sort.format.title
  1202.   *
  1203.   #1 entry.max$ substring$
  1204.   'sort.key$ :=
  1205. }
  1206.  
  1207. ITERATE {presort}
  1208.  
  1209. SORT
  1210.  
  1211. STRINGS { longest.label last.sort.label next.extra }
  1212.  
  1213. INTEGERS { longest.label.width last.extra.num number.label }
  1214.  
  1215. FUNCTION {initialize.longest.label}
  1216. { "" 'longest.label :=
  1217.   #0 int.to.chr$ 'last.sort.label :=
  1218.   "" 'next.extra :=
  1219.   #0 'longest.label.width :=
  1220.   #0 'last.extra.num :=
  1221.   #0 'number.label :=
  1222. }
  1223.  
  1224. FUNCTION {forward.pass}
  1225. { last.sort.label sort.label =
  1226.     { last.extra.num #1 + 'last.extra.num :=
  1227.       last.extra.num int.to.chr$ 'extra.label :=
  1228.     }
  1229.     { "a" chr.to.int$ 'last.extra.num :=
  1230.       "" 'extra.label :=
  1231.       sort.label 'last.sort.label :=
  1232.     }
  1233.   if$
  1234. }
  1235.  
  1236. FUNCTION {reverse.pass}
  1237. { next.extra "b" =
  1238.     { "a" 'extra.label := }
  1239.     'skip$
  1240.   if$
  1241.   label extra.label * 'label :=
  1242.   number.label #1 + 'number.label :=
  1243.   number.label int.to.str$ width$ longest.label.width >
  1244.     { number.label int.to.str$ 'longest.label :=
  1245.       number.label int.to.str$ width$ 'longest.label.width :=
  1246.     }
  1247.     'skip$
  1248.   if$
  1249.   extra.label 'next.extra :=
  1250. }
  1251.  
  1252. EXECUTE {initialize.longest.label}
  1253.  
  1254. ITERATE {forward.pass}
  1255.  
  1256. REVERSE {reverse.pass}
  1257.  
  1258. FUNCTION {begin.bib}
  1259. {   preamble$ empty$
  1260.     'skip$
  1261.     { preamble$ write$ newline$ }
  1262.   if$
  1263.   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  1264. }
  1265.  
  1266. EXECUTE {begin.bib}
  1267.  
  1268. EXECUTE {init.state.consts}
  1269.  
  1270. ITERATE {call.type$}
  1271.  
  1272. FUNCTION {end.bib}
  1273. { newline$
  1274.   "\end{thebibliography}" write$ newline$
  1275. }
  1276.  
  1277. EXECUTE {end.bib}
  1278. %% End of customized bst file 
  1279.